﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPageAdmin.master" AutoEventWireup="true" CodeFile="SanPham.aspx.cs" Inherits="Admin_SanPham" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style5
        {
            width: 170px;
            height: 24px;
        }
        .style6
        {
            width: 450px;
            height: 24px;
        }
        .style7
        {
            width: 140px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table align="center" border="0" cellpadding="0" cellspacing="0" width="960px">
   <tr>
        <td>
            <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
       <table align="center" border="0" cellpadding="5" cellspacing="5" 
                style="width:939px">
                <tr>
                <td>
                        <table>
                                <tr>
            
                                <td class="style7" >
                                    <strong>Tìm Kiếm Tên Sách:</strong>
                                </td>
                                <td align="center" style="width:300px">
                                    <asp:TextBox ID="txttimsanpham" Width="250px" runat="server" placeholder="Từ khóa"></asp:TextBox>
                                </td>
                                <td style="width:200px">
                                    <asp:Button ID="btntmkiem" runat="server" Text="Tìm Kiếm" 
                                        onclick="btntmkiem_Click" BackColor="#A52B2B" ForeColor="White" 
                                        />
                                    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Trở về" 
                                        BackColor="#A52B2B" ForeColor="White" />
                                </td>
                            </tr>
                            <tr>
                            <td colspan="3" align="center">
                                <asp:Button ID="btntaomoi" runat="server" Text="Thêm Sản Phẩm Mới" 
                                    onclick="btntaomoi_Click" BackColor="#A52B2B" ForeColor="White" 
                                  />
                            </td>
                            </tr>
                        </table>
                </td>
            </tr>

              <tr>
        <td align="center" style="height: 117px">
        <br />
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                AutoGenerateColumns="False" CellPadding="4" ForeColor="Black" onpageindexchanging="GridView1_PageIndexChanging1" 
                PageSize="6" onselectedindexchanged="GridView1_SelectedIndexChanged" 
                onrowdeleting="GridView1_RowDeleting" BackColor="White" 
                BorderColor="#CCCCCC" BorderStyle="Dotted" BorderWidth="1px" Height="376px" 
                Width="913px">
                <Columns>
                    <asp:CommandField ShowSelectButton="True" ButtonType="Button" 
                        HeaderText="Chọn Sách" SelectText="Chọn" >
                    <HeaderStyle BackColor="Black" />
                    </asp:CommandField>
                    <asp:CommandField ShowDeleteButton="True" ButtonType="Button" 
                        HeaderText="Xóa Sách" DeleteText="Xóa" UpdateText="" >
                    <HeaderStyle BackColor="Black" />
                    </asp:CommandField>
                    <asp:BoundField DataField="MaSach" HeaderText="Mã Sách" >
                    <HeaderStyle BackColor="Black" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Tensach" HeaderText="Tên Sách" >
                    <HeaderStyle BackColor="Black" />
                    </asp:BoundField>
                    <asp:BoundField DataField="TacGia" HeaderText="Tác Giả" >
                    <HeaderStyle BackColor="Black" />
                    </asp:BoundField>
                    <asp:BoundField DataField="DonGia" HeaderText="Đơn Giá" >
                    <HeaderStyle BackColor="Black" />
                    </asp:BoundField>
                    <asp:BoundField DataField="SoLuong" HeaderText="Số Lượng" >
                    <HeaderStyle BackColor="Black" />
                    </asp:BoundField>
                    <asp:BoundField DataField="NgayDang" HeaderText="Ngày Đăng" >
                    <HeaderStyle BackColor="Black" />
                    </asp:BoundField>
                    <asp:ImageField DataImageUrlField="Hinh" ItemStyle-Width="50px" ControlStyle-Width="70" ControlStyle-Height = "100"
                        DataImageUrlFormatString="../image/{0}" HeaderText="Hình">
                        

                        <ControlStyle Height="100px" Width="70px" />
                        

                        <HeaderStyle BackColor="Black" />
                        

                        <ItemStyle Width="50px" />
                        

                    </asp:ImageField>
                </Columns>
                <EmptyDataTemplate>
                                            Sản Phẩm Không Tồn Tại !
                </EmptyDataTemplate>
                <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#F7F7F7" />
                <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
                <SortedDescendingCellStyle BackColor="#E5E5E5" />
                <SortedDescendingHeaderStyle BackColor="#242121" />
            </asp:GridView>

                    </td>
                </tr>

                
                </table>
        </asp:View>
        <asp:View ID="View2" runat="server">
                <table width="640px" cellpadding="5" cellspacing="5">
                             <tr>    
                                <td style="width:170px;height:15px;font-weight:bold;font-size:15px" align=right>
                                    Mã Sách:    
                                </td>
                                <td style="width:450px" align="left">
                    
                                    <asp:TextBox ID="txtmasach" runat="server" Width="197px"></asp:TextBox>
                    
                                </td>
                                </tr>
                            <tr>
                            <td style="width:170px;height:15px;font-weight:bold;font-size:15px" align=right>
                                Tên Sách:    
                            </td>
                            <td style="width:450px" align="left">
                                <asp:TextBox ID="txttensach" Width="200px"  runat="server" 
                                   ></asp:TextBox>
                            </td>
                            </tr>
                            <tr>
                            <td style="width:170px;height:15px;font-weight:bold;font-size:15px" align=right>
                                Mã NXB:    
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="DropDownListmaNXB" runat="server">
                                </asp:DropDownList>
                            </td>
                            </tr>
                               <tr>
                            <td style="width:170px;height:15px;font-weight:bold;font-size:15px" align=right>
                                Mã Loại Sách:    
                            </td>
                            <td style="width:450px" align="left">
                                <asp:DropDownList ID="DropDownListmaloai" runat="server">
                                </asp:DropDownList>
                            </td>
                            </tr>
                            <tr>
                            <td style="width:170px;height:15px;font-weight:bold;font-size:15px" align=right>
                                Tác Giả:    
                            </td>
                            <td style="width:450px" align="left">
                                <asp:TextBox ID="txttacgia" Width="200px"  runat="server"></asp:TextBox>
                            </td>
                            </tr>
                            <tr>
                            <td style="width:170px;height:15px;font-weight:bold;font-size:15px" align=right>
                                Đơn Giá:    
                            </td>
                            <td style="width:450px" align="left">
                                <asp:TextBox ID="txtdongia" Width="200px"  runat="server"></asp:TextBox>
                            </td>

                            </tr>

                            <tr>
                            <td style="width:170px;height:15px;font-weight:bold;font-size:15px" align=right>
                                &nbsp;Số Lượng:    
                            </td>
                            <td style="width:450px" align="left">
                                <asp:TextBox ID="txtsoluong" runat="server" Width="200px"></asp:TextBox>
                            </td>           
                            </tr>
                            <tr>
                            <td style="width:170px;height:15px;font-weight:bold;font-size:15px" align=right>
                                Ảnh:    
                            </td>
                            <td style="width:450px" align="left">
                                <asp:Image ID="Image1" runat="server" Height="109px" Width="115px" />
                                <asp:FileUpload ID="FileUpload1" runat="server" Height="25px" style="margin-left: 44px" Width="81px" />
                            </td>
                            </tr>
                            <tr>
                            <td style="width:170px;height:15px;font-weight:bold;font-size:15px" align=right>
                                Ngày Đăng:</td>
                            <td style="width:450px" align="left">
                                <asp:TextBox ID="txtngaydang" runat="server" Width="200px"></asp:TextBox>
                            </td>

                            </tr>
                            <tr>
                            <td style="width:170px;height:15px;font-weight:bold;font-size:15px" align=right>
                                Nội Dung:</td>
                            <td style="width:450px" align="left">
                                  <asp:TextBox ID="txtnoidung" runat="server" Height="54px" TextMode="MultiLine" 
                                      Width="200px"></asp:TextBox>
                            </td>

                            </tr>
                             <tr>
                                 <td align="right" class="style5" style="font-weight:bold;font-size:15px">
                                     Năm Xuất Bản:</td>
                                 <td align="left" class="style6">
                                     <asp:TextBox ID="txtnamxb0" runat="server" Width="200px"></asp:TextBox>
                                 </td>
                             </tr>
                            <tr>
                            <td style="width:170px;height:15px;font-weight:bold;font-size:15px" align=right>
                                &nbsp;</td>
                            <td style="width:450px" align="left">
                                <asp:Button ID="btninsert" runat="server" Enabled="False" 
                                    onclick="btninsert_Click" Text="Insert" 
                                    Width="60px" BackColor="#A52B2B" ForeColor="White" />
                                <asp:Button ID="btnupdate" runat="server" onclick="btnupdate_Click" 
                                    Text="Update" ValidationGroup="sanpham" Width="60px" BackColor="#A52B2B" 
                                    ForeColor="White" />
                                <asp:Button ID="btnback" runat="server" Text="Trở Về" Width="60px" 
                                    BackColor="#A52B2B" ForeColor="White" />
                            </td>

                            </tr>

        </table>
        </asp:View>
    </asp:MultiView>
        </td>
   </tr>
</table>
</asp:Content>

